<template>
  <div>
    <div class="logo">
      <img src="../images/优惠券logo.png" />
    </div>
    <div class="btn-content">
      <input v-model="code" type="text" placeholder="请输入礼券兑换码" />
      <van-icon name="photograph" class="icon"/>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            code: ''
        }
    },
    watch: {
        code(val) {
            this.$parent._data.code = this.code;
        }
    }
};
</script>

<style lang="less" scoped>
.logo {
  width: 100%;
  height: 350px;
  padding: 0 20px;
  box-sizing: border-box;
  img {
    width: 100%;
  }
}
.btn-content {
  width: 95%;
  height: 50px;
  background-color: #fff;
  margin: 0 auto;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  input {
    border: none;
    font-size: 18px;
  }
  .icon {
    font-size: 25px;
    color: #999999;
  }
}
</style>
